package org.theqcp.wow.model.player.classes.shaman.talents;

import org.theqcp.wow.model.mechanics.Attribute;
import org.theqcp.wow.model.mechanics.ClassType;
import org.theqcp.wow.model.player.Player;
import org.theqcp.wow.model.player.Talent;

public class AncestralKnowledge extends Talent{

	public AncestralKnowledge(int level) {
		super(level);
	}

	@Override
	public ClassType forClass() {
		return ClassType.SHAMAN;
	}

	@Override
	public String getName() {
		return "Ancestral Knowledge";
	}

	@Override
	public void calculateStats(Player player) {
		//get delta
		Double delta = player.getStatDelta(Attribute.INTELLECT);
		
		//get percent
		Double percent = 2.0 * this.getLevel();
		percent = percent / 100;
		
		//calc percent of delta
		delta = delta * percent;
				
		//set effective
		player.incrementEffectiveStat(Attribute.INTELLECT, Math.floor(delta));
	}
	
}
